package com.report.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.report.dto.response.SearchRes;
import com.report.entity.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author summer
 * @since 2024/06/25 14:54:50
 */
@Mapper
public interface MemberMapper extends BaseMapper<Member> {

    /**
     * 今日收益
     * @return
     */
    BigDecimal findTodayEarningsCount();

    /**
     * 查询当日新增注册
     * @param localDate
     * @return
     */
    Integer findUserCount(@Param("localDate") String localDate);

    /**
     * 当日新增会员
     * @param localDate
     * @return
     */
    Integer memberCount(@Param("localDate") String localDate);

    /**
     * 查询收益
     * @param localDate
     * @return
     */
    BigDecimal findTodayCount(@Param("localDate") String localDate);

    /**
     * 查询热门搜索
     * @return
     */
    List<SearchRes> searchLists();

    /**
     * 查询热门研报
     * @return
     */
    List<SearchRes> reportLists();

    /**
     * 累计金额
     * @return
     */
    BigDecimal totalPrice();

    /**
     * 今日登录人数
     * @return
     */
    Integer loginNum();
}
